package com.gym.client;

import com.gym.pojo.Personaltrainer;
import com.gym.pojo.Train;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@FeignClient(name = "gateway",path = "/inprovider",contextId = "inprovider")
public interface TrainClient {

    @RequestMapping("/selectsj")
    public List<Train> selectsj(@RequestParam String username);
    @RequestMapping("selectycx")
    public boolean selectycx(@RequestParam String trainname);
    @RequestMapping("/insertjl")
    public boolean insertjl(@RequestBody Train train);
    @RequestMapping("/updatejl")
    public boolean updatejl(@RequestBody Train train);
    @RequestMapping("/deletejl")
    public boolean deletejl(@RequestParam int trainid);
    @RequestMapping("/selectid")
    public Train selectid(@RequestParam int trainid);
    @RequestMapping("/insertsjd")
    public boolean insertsjd(@RequestBody Personaltrainer personaltrainer);
    @RequestMapping("/deletesjs")
    public boolean deletesjs(@RequestParam int personalId);
    @RequestMapping("selectsjd")
    public List<Train> selectsjd();
    @RequestMapping("/selectjl")
    public Map<String, Object> selectjl(@RequestParam String trainname,@RequestParam int page,@RequestParam int limit);
    @RequestMapping("/deletesj")
    public boolean deletesj(@RequestParam int trainid);
}
